package org.misalen.web.database.model.mysql.pro;

import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;

import org.hibernate.annotations.DynamicInsert;
import org.hibernate.annotations.DynamicUpdate;
import org.misalen.annotations.DataAccess;
import org.misalen.annotations.Enumeration;
import org.misalen.annotations.ModelComment;
import org.misalen.web.database.model.mysql.BaseSqlModel;

import com.fasterxml.jackson.annotation.JsonIgnoreProperties;

/**
 * 普通用户表
 * 
 * @author guochao
 *
 */
@Entity
@Table(name = "ProUser")
@DynamicInsert(true)
@DynamicUpdate(true)
 @JsonIgnoreProperties({ "addTime","imei","password","loginTime" })
public class ProUser extends BaseSqlModel {

	@ModelComment("手机号")
	@Column(name = "mobile", length = 50, unique = true, nullable = false)
	private String mobile;

	@ModelComment("用户名")
	@Column(name = "userName", length = 50, nullable = false)
	private String userName;

	@ModelComment("设备唯一标识")
	@Column(name = "imei", length = 100, nullable = false)
	@DataAccess(add = false, search = false, update = false, details = false, list = false)
	private String imei;

	@ModelComment("密码")
	@Column(name = "password", length = 50, nullable = false)
	@DataAccess(add = false, search = false, update = false, details = false, list = false)
	private String password;

	@ModelComment("登录时间")
	@Column(name = "loginTime")
	private Date loginTime;

	@ModelComment("归属城市")
	@Enumeration("pro-city")
	@Column(name = "belongCity", length = 50, nullable = false)
	private String belongCity;

	@ModelComment("年龄范围")
	@Enumeration("pro-age")
	@Column(name = "ageRange", length = 50, nullable = true)
	private String ageRange;

	@ModelComment("社会群体")
	@Enumeration("pro-social-groups")
	@Column(name = "socialGroup", length = 50, nullable = true)
	private String socialGroup;

	@ModelComment("今日收入")
	@Column(name = "todayIncome", nullable = false)
	private Long todayIncome;

	@ModelComment("余额")
	@Column(name = "balance ", nullable = false)
	private Long balance;

	@ModelComment("累计提现")
	@Column(name = "withdrawal", nullable = false)
	@DataAccess(add = false, search = false, update = false,list = false)
	private Long withdrawal;

	@ModelComment("状态")
	@DataAccess(add = false, search = false, details = false, list = false)
	@Column(name = "state", length = 50, nullable = false)
	private String state;
	
	@ModelComment("冻结钱包")
	@DataAccess(add = false, search = false, update = false)
	@Column(name = "freezeBalance", nullable = false)
	private Long freezeBalance;

	public Long getFreezeBalance() {
		return freezeBalance;
	}

	public void setFreezeBalance(Long freezeBalance) {
		this.freezeBalance = freezeBalance;
	}

	public String getImei() {
		return imei;
	}

	public void setImei(String imei) {
		this.imei = imei;
	}

	public String getUserName() {
		return userName;
	}

	public void setUserName(String userName) {
		this.userName = userName;
	}

	public String getMobile() {
		return mobile;
	}

	public void setMobile(String mobile) {
		this.mobile = mobile;
	}

	public Date getLoginTime() {
		return loginTime;
	}

	public void setLoginTime(Date loginTime) {
		this.loginTime = loginTime;
	}

	public String getBelongCity() {
		return belongCity;
	}

	public void setBelongCity(String belongCity) {
		this.belongCity = belongCity;
	}

	public String getAgeRange() {
		return ageRange;
	}

	public void setAgeRange(String ageRange) {
		this.ageRange = ageRange;
	}

	public String getSocialGroup() {
		return socialGroup;
	}

	public void setSocialGroup(String socialGroup) {
		this.socialGroup = socialGroup;
	}

	public Long getTodayIncome() {
		return todayIncome;
	}

	public void setTodayIncome(Long todayIncome) {
		this.todayIncome = todayIncome;
	}

	public Long getBalance() {
		return balance;
	}

	public void setBalance(Long balance) {
		this.balance = balance;
	}

	public Long getWithdrawal() {
		return withdrawal;
	}

	public void setWithdrawal(Long withdrawal) {
		this.withdrawal = withdrawal;
	}

	public String getState() {
		return state;
	}

	public void setState(String state) {
		this.state = state;
	}

	public String getPassword() {
		return password;
	}

	public void setPassword(String password) {
		this.password = password;
	}

}
